package com.bdv.md.service.impl;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bdv.md.dao.DmTblDao;
import com.bdv.md.model.DmTbl;
import com.bdv.md.model.MapTbl;
import com.bdv.md.service.DmTblService;

@Service("dmTblService")
@Transactional(readOnly = false)
public class DmTblServiceImpl implements DmTblService {

	@Autowired
	private DmTblDao dmTblDao;
	
	public void saveOrUpdate(DmTbl dmTbl) {
		dmTblDao.saveOrUpdate(dmTbl);
	}

	public void delete(DmTbl dmTbl) {
		dmTblDao.saveOrUpdate(dmTbl);
	}

	public void findById(Integer id) {
		dmTblDao.findById(id);
	}

	public List<DmTbl > findByRange(MapTbl mapTbl, Timestamp start, Timestamp end) {
		return dmTblDao.findByRange(mapTbl,start,end);
	}

}
